package com.blackitheima1.InnerDemo.test4;
//局部内部类
//只能在所在方法中创建对象,使其能被访问
public class TestInner {
    public static void main(String[] args) {
        Outer o=new Outer();
        o.show();

    }
}
class Outer{
    public void show(){
        class Inner{
            public void method(){
                System.out.println("好喝");
            }
        }
        Inner i=new Inner();
        i.method();
    }
}
